{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    }
   },
   "source": [
    "To reproduce the package, run `./Repack.ps1` in powershell. It will clean your cache in `~/.nuget/packages` and pack the library to `Deedle/pkg` folder, which you should specify below (absolute paths only) in `#i` line.\n",
    "\n",
    "The version of the package is always `0.0.0-dev`.\n",
    "\n",
    "To rre-run the build/repack you have to restart the notebook kernel, otherwise we cannot remove the referenced local nuget package."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div><div><strong>Restore sources</strong><ul><li><span> C:/Users/schne/source/repos/fslaborg/Deedle/pkg</span></li></ul></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Deedle, 0.0.0-dev</span></li><li><span>Deedle.Interactive, 0.0.0-dev</span></li></ul></div></div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/markdown": [
       "Loading extensions from `Deedle.Interactive.dll`"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "// be advised, that you always should set absolute paths for local nuget packages - change this to reflect your own setup\n",
    "#i \"nuget: C:/Users/schne/source/repos/fslaborg/Deedle/pkg\"\n",
    "#r \"nuget: Deedle, 0.0.0-dev\"\n",
    "#r \"nuget: Deedle.Interactive, 0.0.0-dev\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Simple series\n",
    "\n",
    "This example shows a simple series with no nested keys. It also does not exceed maxrows to display."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .series tbody tr th:only-of-type {\r\n",
       "vertical-align: middle;\r\n",
       "  }\r\n",
       "  .series tbody tr {,\r\n",
       "vertical-align: top\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='series'>\r\n",
       "<tr><td><b>R1</b></td><td class=\"no-wrap\">-></td><td>1</td></tr><tr><td><b>R2</b></td><td class=\"no-wrap\">-></td><td>2</td></tr>\r\n",
       "</table>\r\n",
       "<p>Series of <b>2</b> items<p><b>0</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "open Deedle\n",
    "\n",
    "series [\"R1\" => 1; \"R2\" => 2]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Simple Frame\n",
    "\n",
    "This example shows a simple frame with no nested keys. It also does not exceed maxrows/cols to display."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .dataframe tbody tr th:only-of-type {\r\n",
       "    vertical-align: middle;\r\n",
       "  }\r\n",
       "  .dataframe tbody tr th {,\r\n",
       "    vertical-align: top\r\n",
       "  }\r\n",
       "  .dataframe thead th {\r\n",
       "    text-align: right;\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "    white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='dataframe'>\r\n",
       "<thead><th></th><th></th><th>C1</th><th>C2</th><th>C3</th><th>C4</th><th>C5</th></thead><thead><th></th><th></th><th>(int)</th><th>(int)</th><th>(int)</th><th>(int)</th><th>(int)</th></thead>\r\n",
       "<tr><td><b>R1</b></td><td class=\"no-wrap\">-></td><td>1</td><td>3</td><td>5</td><td>7</td><td>9</td></tr><tr><td><b>R2</b></td><td class=\"no-wrap\">-></td><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td></tr>\r\n",
       "</table>\r\n",
       "<p><b>2</b> rows x <b>5</b> columns</p><p><b>0</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "open Deedle\n",
    "\n",
    "frame [\n",
    "    \"C1\" => series [\"R1\" => 1; \"R2\" => 2]\n",
    "    \"C2\" => series [\"R1\" => 3; \"R2\" => 4]\n",
    "    \"C3\" => series [\"R1\" => 5; \"R2\" => 6]\n",
    "    \"C4\" => series [\"R1\" => 7; \"R2\" => 8]\n",
    "    \"C5\" => series [\"R1\" => 9; \"R2\" => 10]\n",
    "]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Series with missing values\n",
    "\n",
    "This example shows a series with missing values. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .series tbody tr th:only-of-type {\r\n",
       "vertical-align: middle;\r\n",
       "  }\r\n",
       "  .series tbody tr {,\r\n",
       "vertical-align: top\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='series'>\r\n",
       "<tr><td><b>0</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>1</b></td><td class=\"no-wrap\">-></td><td>1</td></tr><tr><td><b>2</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>3</b></td><td class=\"no-wrap\">-></td><td>3</td></tr><tr><td><b>4</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>5</b></td><td class=\"no-wrap\">-></td><td>5</td></tr><tr><td><b>6</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr>\r\n",
       "</table>\r\n",
       "<p>Series of <b>7</b> items<p><b>4</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "series [for i in 0 .. 6 -> if (i % 2 = 0) then i, nan else i, float i]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Frame with missing values\n",
    "\n",
    "This example shows a frame with missing values. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .dataframe tbody tr th:only-of-type {\r\n",
       "    vertical-align: middle;\r\n",
       "  }\r\n",
       "  .dataframe tbody tr th {,\r\n",
       "    vertical-align: top\r\n",
       "  }\r\n",
       "  .dataframe thead th {\r\n",
       "    text-align: right;\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "    white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='dataframe'>\r\n",
       "<thead><th></th><th></th><th>0</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th></thead><thead><th></th><th></th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th></thead>\r\n",
       "<tr><td><b>0</b></td><td class=\"no-wrap\">-></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td></tr><tr><td><b>1</b></td><td class=\"no-wrap\">-></td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td><b>2</b></td><td class=\"no-wrap\">-></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td></tr><tr><td><b>3</b></td><td class=\"no-wrap\">-></td><td>3</td><td>3</td><td>3</td><td>3</td><td>3</td><td>3</td><td>3</td></tr><tr><td><b>4</b></td><td class=\"no-wrap\">-></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td></tr><tr><td><b>5</b></td><td class=\"no-wrap\">-></td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td><td>5</td></tr><tr><td><b>6</b></td><td class=\"no-wrap\">-></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td></tr>\r\n",
       "</table>\r\n",
       "<p><b>7</b> rows x <b>7</b> columns</p><p><b>28</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "frame [\n",
    "    for i in 0 .. 6 -> \n",
    "        i => series [for ii in 0 .. 6 -> if (ii % 2 = 0) then ii, nan else ii, float ii]\n",
    "]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Complex Series\n",
    "\n",
    "This example shows a more complex series with nested keys and missing values. It also exceeds maxrows to display."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .series tbody tr th:only-of-type {\r\n",
       "vertical-align: middle;\r\n",
       "  }\r\n",
       "  .series tbody tr {,\r\n",
       "vertical-align: top\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='series'>\r\n",
       "<tr><td><b>0</b></td><td><b>0</b></td><td><b>10</b></td><td class=\"no-wrap\">-></td><td>10</td></tr><tr><td><b></b></td><td><b></b></td><td><b>20</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b></b></td><td><b></b></td><td><b>30</b></td><td class=\"no-wrap\">-></td><td>30</td></tr><tr><td><b></b></td><td><b></b></td><td><b>40</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b></b></td><td><b></b></td><td><b>50</b></td><td class=\"no-wrap\">-></td><td>50</td></tr><tr><td><b>...</b></td><td><b></b></td><td><b></b></td><td class=\"no-wrap\">-></td><td>...</td></tr><tr><td><b>1</b></td><td><b>9</b></td><td><b>159</b></td><td class=\"no-wrap\">-></td><td>159</td></tr><tr><td><b></b></td><td><b></b></td><td><b>169</b></td><td class=\"no-wrap\">-></td><td>169</td></tr><tr><td><b></b></td><td><b></b></td><td><b>179</b></td><td class=\"no-wrap\">-></td><td>179</td></tr><tr><td><b></b></td><td><b></b></td><td><b>189</b></td><td class=\"no-wrap\">-></td><td>189</td></tr><tr><td><b></b></td><td><b></b></td><td><b>199</b></td><td class=\"no-wrap\">-></td><td>199</td></tr>\r\n",
       "</table>\r\n",
       "<p>Series of <b>200</b> items<p><b>10</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "series [for ii in 1 .. 200 -> ((ii % 2),(string (ii % 10), float ii )) => (if (ii % 20 = 0) then nan else float ii)]\n",
    "|> Series.sortByKey"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Complex frame\n",
    "\n",
    "This example shows a more complex frame with nested keys for both columns and rows, and missing values. It also exceeds maxrows/cols to display."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .dataframe tbody tr th:only-of-type {\r\n",
       "    vertical-align: middle;\r\n",
       "  }\r\n",
       "  .dataframe tbody tr th {,\r\n",
       "    vertical-align: top\r\n",
       "  }\r\n",
       "  .dataframe thead th {\r\n",
       "    text-align: right;\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "    white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='dataframe'>\r\n",
       "<thead><th></th><th></th><th></th><th></th><th>0</th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th>...</th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th></thead><thead><th></th><th></th><th></th><th></th><th>0</th><th></th><th></th><th></th><th></th><th>2</th><th></th><th></th><th></th><th></th><th>...</th><th>7</th><th></th><th></th><th></th><th></th><th>9</th><th></th><th></th><th></th><th></th></thead><thead><th></th><th></th><th></th><th></th><th>10</th><th>20</th><th>30</th><th>40</th><th>50</th><th>2</th><th>12</th><th>22</th><th>32</th><th>42</th><th>...</th><th>7</th><th>17</th><th>27</th><th>37</th><th>47</th><th>9</th><th>19</th><th>29</th><th>39</th><th>49</th></thead><thead><th></th><th></th><th></th><th></th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>...</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th><th>(float)</th></thead>\r\n",
       "<tr><td><b>0</b></td><td><b>0</b></td><td><b>10</b></td><td class=\"no-wrap\">-></td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>...</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td><td>10</td></tr><tr><td><b></b></td><td><b></b></td><td><b>20</b></td><td class=\"no-wrap\">-></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td>...</td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td></tr><tr><td><b></b></td><td><b></b></td><td><b>30</b></td><td class=\"no-wrap\">-></td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>...</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td><td>30</td></tr><tr><td><b></b></td><td><b></b></td><td><b>40</b></td><td class=\"no-wrap\">-></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td>...</td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td><td><missing></td></tr><tr><td><b></b></td><td><b></b></td><td><b>50</b></td><td class=\"no-wrap\">-></td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>...</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td><td>50</td></tr><tr><td><b>:</b></td><td><b>:</b></td><td><b>:</b></td><td class=\"no-wrap\"></td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr><tr><td><b>1</b></td><td><b>9</b></td><td><b>159</b></td><td class=\"no-wrap\">-></td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>...</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td><td>159</td></tr><tr><td><b></b></td><td><b></b></td><td><b>169</b></td><td class=\"no-wrap\">-></td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>...</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td><td>169</td></tr><tr><td><b></b></td><td><b></b></td><td><b>179</b></td><td class=\"no-wrap\">-></td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>...</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td><td>179</td></tr><tr><td><b></b></td><td><b></b></td><td><b>189</b></td><td class=\"no-wrap\">-></td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>...</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td><td>189</td></tr><tr><td><b></b></td><td><b></b></td><td><b>199</b></td><td class=\"no-wrap\">-></td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>...</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td><td>199</td></tr>\r\n",
       "</table>\r\n",
       "<p><b>200</b> rows x <b>50</b> columns</p><p><b>500</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "open Deedle\n",
    "\n",
    "\n",
    "frame [\n",
    "    for i in 1 .. 50 ->\n",
    "        ((i % 2),(string (i % 10), float i)) => series [for ii in 1 .. 200 -> ((ii % 2),(string (ii % 10), float ii )) => (if (ii % 20 = 0) then nan else float ii)]\n",
    "]\n",
    "|> Frame.sortRowsByKey\n",
    "|> Frame.sortColsByKey\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Customizing interactive formatter config\n",
    "\n",
    "Some settings are exposed as mutable values so they can be changed on the fly:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .dataframe tbody tr th:only-of-type {\r\n",
       "    vertical-align: middle;\r\n",
       "  }\r\n",
       "  .dataframe tbody tr th {,\r\n",
       "    vertical-align: top\r\n",
       "  }\r\n",
       "  .dataframe thead th {\r\n",
       "    text-align: right;\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "    white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='dataframe'>\r\n",
       "<thead><th></th><th></th><th>C1</th><th>...</th><th>C5</th></thead><thead><th>R1</th><th>-></th><th>1</th><th>...</th><th>9</th></thead>\r\n",
       "<tr><td><b>:</b></td><td class=\"no-wrap\"></td><td>...</td><td>...</td><td>...</td></tr><tr><td><b>R3</b></td><td class=\"no-wrap\">-></td><td>2</td><td>...</td><td>10</td></tr>\r\n",
       "</table>\r\n",
       "\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Deedle.Interactive.InteractiveConfig.Frame.MaxCols <- 2\n",
    "Deedle.Interactive.InteractiveConfig.Frame.MaxRows <- 2\n",
    "Deedle.Interactive.InteractiveConfig.Frame.ShowColTypes <- false\n",
    "Deedle.Interactive.InteractiveConfig.Frame.ShowInfo <- false\n",
    "\n",
    "frame [\n",
    "    \"C1\" => series [\"R1\" => 1; \"R2\" => 2  ;\"R3\" => 2   ]\n",
    "    \"C2\" => series [\"R1\" => 3; \"R2\" => 4  ;\"R3\" => 4   ]\n",
    "    \"C3\" => series [\"R1\" => 5; \"R2\" => 6  ;\"R3\" => 6   ]\n",
    "    \"C4\" => series [\"R1\" => 7; \"R2\" => 8  ;\"R3\" => 8   ]\n",
    "    \"C5\" => series [\"R1\" => 9; \"R2\" => 10 ;\"R3\" => 10  ]\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .series tbody tr th:only-of-type {\r\n",
       "vertical-align: middle;\r\n",
       "  }\r\n",
       "  .series tbody tr {,\r\n",
       "vertical-align: top\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='series'>\r\n",
       "<tr><td><b>0</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>...</b></td><td class=\"no-wrap\">-></td><td>...</td></tr><tr><td><b>6</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr>\r\n",
       "</table>\r\n",
       "<p><b>4</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Deedle.Interactive.InteractiveConfig.Series.MaxItems <- 2\n",
    "Deedle.Interactive.InteractiveConfig.Series.ShowItemCount <- false\n",
    "\n",
    "series [for ii in 0 .. 6 -> if (ii % 2 = 0) then ii, nan else ii, float ii]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "these settings can also be reset:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [],
   "source": [
    "Deedle.Interactive.InteractiveConfig.Reset()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .dataframe tbody tr th:only-of-type {\r\n",
       "    vertical-align: middle;\r\n",
       "  }\r\n",
       "  .dataframe tbody tr th {,\r\n",
       "    vertical-align: top\r\n",
       "  }\r\n",
       "  .dataframe thead th {\r\n",
       "    text-align: right;\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "    white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='dataframe'>\r\n",
       "<thead><th></th><th></th><th>C1</th><th>C2</th><th>C3</th><th>C4</th><th>C5</th></thead><thead><th></th><th></th><th>(int)</th><th>(int)</th><th>(int)</th><th>(int)</th><th>(int)</th></thead>\r\n",
       "<tr><td><b>R1</b></td><td class=\"no-wrap\">-></td><td>1</td><td>3</td><td>5</td><td>7</td><td>9</td></tr><tr><td><b>R2</b></td><td class=\"no-wrap\">-></td><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td></tr><tr><td><b>R3</b></td><td class=\"no-wrap\">-></td><td>2</td><td>4</td><td>6</td><td>8</td><td>10</td></tr>\r\n",
       "</table>\r\n",
       "<p><b>3</b> rows x <b>5</b> columns</p><p><b>0</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "frame [\n",
    "    \"C1\" => series [\"R1\" => 1; \"R2\" => 2  ;\"R3\" => 2   ]\n",
    "    \"C2\" => series [\"R1\" => 3; \"R2\" => 4  ;\"R3\" => 4   ]\n",
    "    \"C3\" => series [\"R1\" => 5; \"R2\" => 6  ;\"R3\" => 6   ]\n",
    "    \"C4\" => series [\"R1\" => 7; \"R2\" => 8  ;\"R3\" => 8   ]\n",
    "    \"C5\" => series [\"R1\" => 9; \"R2\" => 10 ;\"R3\" => 10  ]\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "fsharp"
    },
    "vscode": {
     "languageId": "dotnet-interactive.fsharp"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\r\n",
       "<style scoped>,\r\n",
       "  .series tbody tr th:only-of-type {\r\n",
       "vertical-align: middle;\r\n",
       "  }\r\n",
       "  .series tbody tr {,\r\n",
       "vertical-align: top\r\n",
       "  }\r\n",
       "  .no-wrap {\r\n",
       "white-space: nowrap;\r\n",
       "  }\r\n",
       "</style>\r\n",
       "<table border='1' class='series'>\r\n",
       "<tr><td><b>0</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>1</b></td><td class=\"no-wrap\">-></td><td>1</td></tr><tr><td><b>2</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>3</b></td><td class=\"no-wrap\">-></td><td>3</td></tr><tr><td><b>4</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr><tr><td><b>5</b></td><td class=\"no-wrap\">-></td><td>5</td></tr><tr><td><b>6</b></td><td class=\"no-wrap\">-></td><td><missing></td></tr>\r\n",
       "</table>\r\n",
       "<p>Series of <b>7</b> items<p><b>4</b> missing values</p>\r\n",
       "</div>\r\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "series [for ii in 0 .. 6 -> if (ii % 2 = 0) then ii, nan else ii, float ii]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".NET (F#)",
   "language": "F#",
   "name": ".net-fsharp"
  },
  "language_info": {
   "name": "F#"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
